From 5a88f7033e354314a5935c583aabd2ffbd4504a2 Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Thu, 19 Jun 2014 18:32:45 +0200 Subject: [PATCH] configure: make the libaio test conditional on blktap{1, 2} MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit libaio is only required for blktap{1,2}, so make the check conditional on whether the user has requested blktap{1,2} or not. Signed-off-by: Roger Pau Monné Cc: Ian Jackson Cc: Ian Campbell Acked-by: Ian Campbell [ ijc -- reran autogen.sh ] --- tools/configure | 4 ++++ tools/configure.ac | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tools/configure b/tools/configure index d84d9504ec..eebe745d8d 100755 --- a/tools/configure +++ b/tools/configure @@ -7535,6 +7535,8 @@ fi +if test "x$enable_blktap1" = "xyes" || test "x$enable_blktap2" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for io_setup in -laio" >&5 $as_echo_n "checking for io_setup in -laio... " >&6; } if ${ac_cv_lib_aio_io_setup+:} false; then : @@ -7583,6 +7585,8 @@ else fi +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5 in -lcrypto" >&5 $as_echo_n "checking for MD5 in -lcrypto... " >&6; } if ${ac_cv_lib_crypto_MD5+:} false; then : diff --git a/tools/configure.ac b/tools/configure.ac index 836bbba4a3..6d70f04fe1 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -262,7 +262,9 @@ AC_CHECK_HEADER([lzo/lzo1x.h], [ AC_CHECK_LIB([lzo2], [lzo1x_decompress], [zlib="$zlib -DHAVE_LZO1X -llzo2"]) ]) AC_SUBST(zlib) +AS_IF([test "x$enable_blktap1" = "xyes" || test "x$enable_blktap2" = "xyes"], [ AC_CHECK_LIB([aio], [io_setup], [], [AC_MSG_ERROR([Could not find libaio])]) +]) AC_SUBST(system_aio) AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])]) AX_CHECK_EXTFS -- 2.30.2